package com.qzsoft.zhjd.asphalt.modules.statisticsmaterial.service.impl;

import java.util.Map;

import com.qzsoft.zhjd.asphalt.modules.statisticsmaterial.dto.AsphaltStatisticsMaterialDto;
import com.qzsoft.zhjd.asphalt.modules.statisticsmaterial.mapper.AsphaltStatisticsMaterialMapper;
import com.qzsoft.zhjd.asphalt.modules.statisticsmaterial.service.AsphaltStatisticsMaterialService;
import com.qzsoft.zhjd.common.annotation.ZhjdDataFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.jeemis.common.utils.ConvertDictUtils;
import com.qzsoft.zhjd.common.components.BaseServiceComponent;

/**
 * @ClassName AsphaltStatisticsMaterialServiceImpl
 * @Description 沥青物料用料统计业务接口实现
 * @author linhuawei
 * @since 2021-12-07
 */
@Service
public class AsphaltStatisticsMaterialServiceImpl implements AsphaltStatisticsMaterialService {

    @Autowired
    private AsphaltStatisticsMaterialMapper asphaltStatisticsMaterialMapper;

    @Autowired
    private BaseServiceComponent baseServiceComponent;

    @ZhjdDataFilter(tableAlias = "t1")
    @Override
    public IPage<AsphaltStatisticsMaterialDto> pageDto(Map<String, Object> params) {
        IPage<AsphaltStatisticsMaterialDto> page = baseServiceComponent.getPage(params,
                AsphaltStatisticsMaterialDto.class);
        page = asphaltStatisticsMaterialMapper.queryDto(page, params);
        return ConvertDictUtils.formatDicDataPage(page);
    }

}
